<script>
	// #ifdef MP-WEIXIN
	var fetchWechat = require('fetch-wechat');
	var tf = require('@tensorflow/tfjs-core');
	var webgl = require('@tensorflow/tfjs-backend-webgl');
	var plugin = requirePlugin('tfjsPlugin');
	// #endif
	export default {
		globalData: {
			localStorageIO: plugin.localStorageIO,
		},
		onLaunch: function() {
			// #ifdef MP-WEIXIN
			plugin.configPlugin({
				// polyfill fetch function
				fetchFunc: fetchWechat.fetchFunc(),
				// inject tfjs runtime
				tf,
				// inject webgl backend
				webgl,
				// provide webgl canvas
				canvas: wx.createOffscreenCanvas()
			});
			// #endif
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
